package com.t235.gc.goods.service;

import com.t235.gc.entity.Goods;
import com.t235.gc.goods.Dao.GoodsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GoodService {
    @Autowired
    private GoodsMapper goodsMapper;

    public Object selectCha(Integer isStock,Integer isFault){
        return goodsMapper.selectCha(isStock,isFault);
    }

    public Integer update(Goods goods){
        return goodsMapper.updateByPrimaryKey(goods);
    }

    public Integer insert(Goods goods){
        return goodsMapper.insert(goods);
    }

    public Integer delete(Long id){
        return goodsMapper.deleteByPrimaryKey(id);
    }
}
